<script setup>
defineProps({
  list: {
    type: Array,
    default: () => []
  }
})
</script>

<template>
  <view class="drug-order">
    <navigator 
      v-for="(item, index) in list" 
      :key="index"
      :url="item.url || ''" 
      hover-class="none"
    >
      <uni-badge
        :text="item.count || '0'"
        type="primary"
        :inverted="true"
        absolute="rightTop"
        :offset="[2, 2]"
      >
        <image
          :src="item.icon || '/static/images/order-status-1.png'"
          class="status-icon"
        ></image>
      </uni-badge>
      <text class="status-label">{{ item.label || '待付款' }}</text>
    </navigator>
  </view>
</template>

<style lang="scss" scoped>
.drug-order {
  display: flex;
  justify-content: space-between;
  text-align: center;
  padding: 30rpx 20rpx 10rpx;
  .status-icon {
    width: 54rpx;
    height: 54rpx;
  }
  .status-label {
    display: block;
    font-size: 24rpx;
    margin-top: 10rpx;
    color: #3c3e42;
  }
}
</style> 